<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link type="text/css" rel="stylesheet" href="css/shop.css">
<script type="text/javascript" src="js/jquery-1.11.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$("#addButton").click(function(){
		window.location.href="jump.do";
	});
	$(".updateButton").click(function(){
		var id = $(this).parent().parent().find(":first-child").html();
		window.location.href="findShop.do?id="+id;
	});
	$(".deleteButton").click(function(){
		var id = $(this).parent().parent().find(":first-child").html();
		window.location.href="deleteShop.do?id="+id;
	});
	$("#shopButton").click(function(){
		window.location.href="shoplist.do"
	});
	$("#foodButton").click(function(){
		window.location.href="foodlist.do"
	});
	$("#userButton").click(function(){
		window.location.href="userlist.do"
	});
	$("#orderButton").click(function(){
		window.location.href="orderlist.do"
	});
	$("#collectButton").click(function(){
		window.location.href="collectlist.do"
	});
	$("#addPic").click(function(){
		window.location.href="listPics.do"
	});
});

</script>
</head>
<body>
<div id="menu"><Button class="menuButton" id="shopButton">店铺</Button><Button class="menuButton" id="foodButton">菜品</Button><button class="menuButton" id="orderButton">订单</button><button class="menuButton" id="userButton">用户</button><button class="menuButton" id="collectButton">收藏</button>
</div>
</div>
<div id="toolbar"><form action="search.do"><button class="menuButton"  type="button" id="addButton">添加</button>
<script> 

</script>
<select name="condition">
<option value="shop_id">店铺ID</option>
<option value="shopname">店铺名称</option>
<option value="phonenum">电话</option>
<option value="address">地址</option>
<option value="intro">店铺简介</option>
<option value="level">推荐等级</option>
<option value="comment">备注</option>
</select><input type="text" name="value" id="inputtext"/><input type="submit" value="搜索"/><button class="menuButton"  type="button" style="margin-left:20px" id="addPic">添加图片</button></form>
</div>
<div id="table" > 
<table border=1 cellspacing="0" cellpadding="0">
<tr>
<th >店铺ID</th><th >店铺名称</th><th >店铺地址</th><th >店铺电话</th><th>店铺简介</th><th>店铺图片</th><th>店铺等级</th><th>备注</th><th>操作</th>
</tr>
 <c:forEach items="${list }" var="s">
 <tr>
 <td>${s.shop_id}</td><td>${s.shopname}</td><td>${s.address}</td>
 <td>${s.phonenum}</td><td>${s.intro}</td><td><img alt="" src="image/${s.pic}.jpg" width="100px" height="100px"></td><td>${s.level}</td><td>${s.comment}</td><td><button class="updateButton" >修改</button ><button class="deleteButton">删除</button></td>
 </tr>
 </c:forEach>
</table>
</div>
</body>
</html>